<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>系统管理</title>
<%@ include file="/common/util.jsp"%>
<script type="text/javascript">

function jumpPage(pageIndex) {
  window.location.href="${cdnctx}/recentPay/list.shtml?pageIndex="+pageIndex;
}

function pay(companycode,year,month,status){
	dialog_confirmled("确认该客户已经缴费？",function(){
		$payment = {
			"companycode":companycode,
			"year":year,
			"month":month,
			"status":status
		}
	  $.ajax({
			type:"POST", 
			contentType:"application/json",
			url: '${cdnctx}/recentPay/addPay.shtml',
			data:JSON.stringify($payment), 
			dataType: "json",
			success: function(data) {
				if(!_.isEmpty(data)){
					location.reload();
				}
			}
		});
	})
}

</script>
</head>
<body class="main">
	<div class="-frame -style -luster" id="css_container">
		<!--首页框架页眉部分↓-->
		<%@ include file="/WEB-INF/pages/inc/header.jsp"%>
		<!--首页框架页眉部分↑-->

		<div class="content">

			<!-- Left导航菜单◎开始 -->
			<%@ include file="/WEB-INF/pages/inc/leftmenu.jsp"%>
			<!-- Left导航菜单◎结束 -->

			<div class="main-mid">
				<div class="pos"><img src="${cdnctx}/src/index/img/index.png"><a href="#">${searchDate }_缴费概况</a></div>
				<div class="css_contentDiv">
					<form id="searchLoginForm" action="${cdnctx}/recentPay/list.shtml" method="post">
						<div style="padding:10px;">
							<label class="search_text">公司名称：</label> 
							<input id="searchUserName" name="customerName"  type="text" class="search_input" value="${customerName}" />
							<label class="search_text">查询日期：</label>
							<input type="text" style="cursor: pointer;" readOnly class="search_input Wdate" id="searchDate" name="searchDate" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM'})" placeholder="请输入查询日期">
							<input type="submit" class="search_btn" value="查&nbsp;询" />
							<input type="reset" class="reset_btn" value="重&nbsp;置"/>
						</div>
					</form>
					<div class="detailDiv">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list_table"  >
							<thead>
								<tr>
									<td>公司番号</td>
									<td>公司名</td>
									<td>缴费日期</td>
									<td>联系人</td>
									<td>座机/手机</td>
									<td>地址</td>
									<td>Email</td>
									<td>缴费状态</td>
									<td>操作</td>
								</tr>
							</thead>
							<c:if test="${empty(remindList) }">
								<tr class="even" align="center" style="color:red">
									<td colspan="7" class="no-data" style="height: 300px;"></td>
								</tr>
							</c:if>
							<c:if test="${not empty(remindList) }">
							<c:forEach items="${remindList}" var="entity" varStatus="status">
								<tr <c:if test="${entity.status==1}">class="odd"</c:if>>
									<td>${entity.companycode}</td>
									<td>${entity.customername}</td>
									<td >${MONTH }月${entity.lastpaydate}日</td>
									<td>${entity.contact}</td>
									<td>${entity.tel}
										<c:if test="${entity.tel!='' && entity.mobile!=''}">/</c:if>
										${entity.mobile}</td>	
									<td>${entity.address}</td>
									<td>${entity.email}</td>
									<td>${entity.statusName}</td>
									<td><c:if test="${entity.status==1}"><a href="javascript:pay(${entity.companycode},${YEAR},${MONTH},2)">缴纳</a></c:if>
										<!-- <input type='button' class='b-inputButton' onclick='pay(${entity.companycode},${YEAR},${MONTH},3)' value='延期缴纳' /> -->
									</td>
								</tr>
							</c:forEach>
							</c:if>
						</table>
					</div>
					<c:if test="${not empty(remindList) }">
						<div id="pageInfo" class="pageJump">
							<script type="text/javascript">
				            	pagination.getPaginationHtml('JavaScript:jumpPage({0})',${pageIndex},${pageCount},'pageInfo');
				        	</script>
				        	<c:if test="${!empty(remindList) }">
				        		共有${dataCount}条数据
				        	</c:if>
						</div>
					</c:if>
				</div>
			</div>
		</div>
		<!--首页框架页尾部分↓-->
		<%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
		<!--首页框架页尾部分↑-->
	</div>
</body>
</html>